<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../../print.css" type="text/css" media="print">
<meta content="Oscillate,org.as3lib.kitchensync.easing.Oscillate,defaultFrequency,defaultPulseWidth,snapping,absoluteSine,pulse,sawtooth,sine,triangle" name="keywords">
<title>org.as3lib.kitchensync.easing.Oscillate</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Oscillate - KitchenSync';
				var baseRef = '../../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../all-classes.html')" href="../../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../../index-list.html')" href="../../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../../index.html?org/as3lib/kitchensync/easing/Oscillate.html&amp;org/as3lib/kitchensync/easing/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Oscillate</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Oscillate"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">org.as3lib.kitchensync.easing</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Oscillate</td>
</tr>
</table>
<p></p>
  <p>Oscillate is slightly different from the other easing classes. The functions in this class cause 
  motion that oscillates at a specified frequency based on the timeElapsed. The values will continue to oscilate
  between 0.0 and 1.0 without reaching an end point. However, if <code>snapping</code> is set to true, the
  functions will return a 1.0 when the duration has elapsed.</p>
  <p>The easing classes provide static methods for interpolating the change between two values over time.
  Each class handles the interpolation, or easing, differently. Each class typically contains three methods
   - <code>easeIn()</code>, <code>easeOut()</code> and <code>easeInOut()</code> - which vary the rate of change
   of the values. Most of the easing functions produce values as a percentage - a number between 0.0 and 1.0</p>
    
   <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="EasingUtil.html" target="">EasingUtil</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultFrequency">defaultFrequency</a> : Number = 1<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#defaultPulseWidth">defaultPulseWidth</a> : Number = 0.5<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#snapping">snapping</a> : Boolean = false<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#absoluteSine()">absoluteSine</a>(timeElapsed:Number, duration:Number, frequency:Number):Number</div>
<div class="summaryTableDescription">[static]
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in an absolute sinusoidal (half-wave) motion.</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#pulse()">pulse</a>(timeElapsed:Number, duration:Number, frequency:Number, pulseWidth:Number):Number</div>
<div class="summaryTableDescription">[static]
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in square or pulse wave motion.</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#sawtooth()">sawtooth</a>(timeElapsed:Number, duration:Number, frequency:Number):Number</div>
<div class="summaryTableDescription">[static]
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in linear motion.</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#sine()">sine</a>(timeElapsed:Number, duration:Number, frequency:Number):Number</div>
<div class="summaryTableDescription">[static]
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in a sinusoidal motion.</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#triangle()">triangle</a>(timeElapsed:Number, duration:Number, frequency:Number):Number</div>
<div class="summaryTableDescription">[static]
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in linear motion.</div>
</td><td class="summaryTableOwnerCol">Oscillate</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="defaultFrequency"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultFrequency</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public static var defaultFrequency:Number = 1</code>
</div>
<a name="defaultPulseWidth"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">defaultPulseWidth</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var defaultPulseWidth:Number = 0.5</code>
</div>
<a name="snapping"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">snapping</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static var snapping:Boolean = false</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="absoluteSine()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">absoluteSine</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public static function absoluteSine(timeElapsed:Number, duration:Number, frequency:Number):Number</code><p>
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in an absolute sinusoidal (half-wave) motion. The subject will appear to be bouncing.
     The position will be based on the timeElapsed and frequency.
          </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeElapsed</span>:Number</code> &mdash; - Specifies the time since the tween began in milliseconds or frames.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; - Specifies the duration of the tween, in milliseconds or frames.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">frequency</span>:Number</code> &mdash; - The frequency of the sine wave in hertz. Higher is faster. 1/frequency = wavelength
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number - between 0.0 and 1.0 based on the time and frequency. Returns 1.0 if duration is elapsed and snapping is turned on.
     </td>
</tr>
</table>
</div>
<a name="pulse()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">pulse</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function pulse(timeElapsed:Number, duration:Number, frequency:Number, pulseWidth:Number):Number</code><p>
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in square or pulse wave motion. The subject will appear to alternate between the start and end points.
     The position will be based on the timeElapsed and frequency.
          </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeElapsed</span>:Number</code> &mdash; - Specifies the time since the tween began in milliseconds or frames.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; - Specifies the duration of the tween, in milliseconds or frames.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">frequency</span>:Number</code> &mdash; - The frequency of the sine wave in hertz. Higher is faster. 1/frequency = wavelength
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">pulseWidth</span>:Number</code> &mdash; - The width of the upside of the square wave as a percentage. 0.5 is half up, half down. 0.0 is all down, 1.0 is all up.
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number - between 0.0 and 1.0 based on the time and frequency. Returns 1.0 if duration is elapsed and snapping is turned on.
     </td>
</tr>
</table>
</div>
<a name="sawtooth()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sawtooth</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function sawtooth(timeElapsed:Number, duration:Number, frequency:Number):Number</code><p>
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in linear motion.
     The position will be based on the timeElapsed and frequency.
          </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeElapsed</span>:Number</code> &mdash; - Specifies the time since the tween began in milliseconds or frames.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; - Specifies the duration of the tween, in milliseconds or frames.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">frequency</span>:Number</code> &mdash; - The frequency of the sine wave in hertz. Higher is faster. 1/frequency = wavelength
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number - between 0.0 and 1.0 based on the time and frequency. Returns 1.0 if duration is elapsed and snapping is turned on.
     </td>
</tr>
</table>
</div>
<a name="sine()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">sine</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function sine(timeElapsed:Number, duration:Number, frequency:Number):Number</code><p>
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in a sinusoidal motion. The position will be based on the timeElapsed and frequency.
          </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeElapsed</span>:Number</code> &mdash; - Specifies the time since the tween began in milliseconds or frames.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; - Specifies the duration of the tween, in milliseconds or frames.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">frequency</span>:Number</code> &mdash; - The frequency of the sine wave in hertz. Higher is faster. 1/frequency = wavelength
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number - between 0.0 and 1.0 based on the time and frequency. Returns 1.0 if duration is elapsed and snapping is turned on.
     </td>
</tr>
</table>
</div>
<a name="triangle()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">triangle</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static function triangle(timeElapsed:Number, duration:Number, frequency:Number):Number</code><p>
     Oscillates between 0 and 1.0 (starting with 0 and ending with 1.0) for as long as the duration lasts 
     in linear motion.
     The position will be based on the timeElapsed and frequency.
          </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeElapsed</span>:Number</code> &mdash; - Specifies the time since the tween began in milliseconds or frames.
     </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">duration</span>:Number</code> &mdash; - Specifies the duration of the tween, in milliseconds or frames.
       </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">frequency</span>:Number</code> &mdash; - The frequency of the sine wave in hertz. Higher is faster. 1/frequency = wavelength
     </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; Number - between 0.0 and 1.0 based on the time and frequency. Returns 1.0 if duration is elapsed and snapping is turned on.
     </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
